package com.pureut.equipment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pureut.equipment.domain.MaintenanceWorkOrder;
import com.pureut.equipment.domain.dto.MaintenanceWorkOrderDto;
import com.pureut.equipment.domain.vo.AuditVo;
import com.pureut.equipment.domain.vo.MaintenanceWorkOrderVo;

import java.util.List;

/***
 *
 * Author:保养工单service
 * Date:2023/04/24 9:49
 * @DESC
 */
public interface MaintenanceWorkOrderService extends IService<MaintenanceWorkOrder> {

    /**
     * 保养工单列表
     */
    List<MaintenanceWorkOrderDto> getList(MaintenanceWorkOrderVo maintenanceWorkOrderVo);

    /**
     * 保养工单新增
     */
    boolean add(MaintenanceWorkOrderVo maintenanceWorkOrderVo) throws Exception;

    /**
     * 保养工单新增(当日生成调用)
     */
    boolean addToday(MaintenanceWorkOrderVo maintenanceWorkOrderVo) throws Exception;

    /**
     * 派工
     */
    boolean dispatch(MaintenanceWorkOrderVo maintenanceWorkOrderVo);

    /**
     * 执行保养
     */
    boolean execute(MaintenanceWorkOrderVo maintenanceWorkOrderVo);

    /**
     * 提交审核
     */
    boolean audit(Long id);

    /**
     * 撤销审核
     */
    boolean revocation(Long id);

    /**
     * 审核
     */
    boolean documentAudit(AuditVo auditVo);

    /**
     * 修改
     */
    boolean updateWorkOrder(MaintenanceWorkOrderVo maintenanceWorkOrderVo);

    /**
     * 查看
     */
    MaintenanceWorkOrderDto getView(Long id);

    /**
     * 删除
     */
    boolean deleteWorkOrder(Long id);

    /**
     * 保养工单新增(定时任务调用)
     */
    boolean addScheduling(MaintenanceWorkOrderVo maintenanceWorkOrderVo) throws Exception;
}
